calculate these:
g =   parent's cost   +   added cost for this node
h =   distance from this node to end node
f =   g + h

costSoFar
distanceToEnd
totalCost



add current node to "open" list

while (open list has nodes)  AND  selected node isn't destination
	close this node
	
	calculate surrounding nodes if they're not closed or open
	add surrounding nodes to "open" list
	
	select the node with the lowest "f"
	remove it from "open" list
end while



add destination to "nav" list
while selected node != starting place
	select surrounding node with lowest "g"  (skip uncalculated ones)
	add that node to "nav" list
end while
reverse the "nav" list